package io.renren.modules.sp.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.common.utils.Result;
import io.renren.modules.sp.dto.SpTeamDTO;
import io.renren.modules.sp.entity.SpTeamEntity;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 领队
 *
 * @author Mark sunlightcs@gmail.com
 * @since 3.0 2023-04-20
 */
public interface SpTeamService extends CrudService<SpTeamEntity, SpTeamDTO> {

    PageData<Map> queryPage(Map<String, Object> params);
    Map<String,Object> queryById(Long id);

    Result<Map<String,Object>> saveTeam(SpTeamDTO dto);

    Result<Map<String,Object>> updateTeam(SpTeamDTO dto);

    List<SpTeamEntity> queryList(QueryWrapper<SpTeamEntity> params);

    PageData<Map> pageQuery(Map<String, Object> params);

    Map<String, Object> queryTeamInfo(Long id);


    List<SpTeamEntity> isExistCompany(String company);
    boolean isLimitNum(Long teamId);

    Map<String, Object> queryTeamInfoByCreator(Long id);

    Map<String, Object> queryTeamInfoByPhone(String phone);

    Result<String> downloadPromissFile(Map<String, Object> params, HttpServletResponse response);

    boolean closeAll();

}
